package com.plpm.modules.deploy.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.http.ResponseEntity;

/**
 * 部署控制器
 */
@RestController
@RequestMapping("/deploy")
public class DeployController {

    @PostMapping("/start")
    public ResponseEntity<String> startDeploy(@RequestBody String version) {
        // TODO: 实现部署逻辑
        return ResponseEntity.ok("Deploy started");
    }

    @GetMapping("/status/{deployId}")
    public ResponseEntity<String> getDeployStatus(@PathVariable String deployId) {
        // TODO: 实现状态查询逻辑
        return ResponseEntity.ok("Deploy status");
    }

    @PostMapping("/rollback/{deployId}")
    public ResponseEntity<String> rollback(@PathVariable String deployId) {
        // TODO: 实现回退逻辑
        return ResponseEntity.ok("Rollback started");
    }
}